package net.infamily.dao.impl;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;

public class JdoPersistanceModule extends AbstractModule {
	private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

	@Provides
	public PersistenceManager getPersistenceManager() {
		return pmfInstance.getPersistenceManager();
	}
	
	@Provides
	public PersistenceManagerFactory getPersistenceManagerFactory() {
		return pmfInstance;
	}

	@Override
	protected void configure() {		
	}
}
